package com.innodata.riskEngine.common.pojo;

import java.io.Serializable;
import java.util.Objects;

public class SourceSerializePO implements Serializable {

    private static final long serialVersionUID = 4537095107855746869L;

    /**
     * 银行号
     */
    private String bank;

    /**
     * 渠道：商城-mall；花积分-huajifen；游戏-game
     */
    private String channel;

    /**
     * 事件时间戳
     */
    private long eventTimestamp;

    /**
     * 各渠道数据
     */
    private String channelData;

    // setter and getter

    public String getBank() {
        return bank;
    }

    public void setBank(String bank) {
        this.bank = bank;
    }

    public String getChannel() {
        return channel;
    }

    public void setChannel(String channel) {
        this.channel = channel;
    }

    public long getEventTimestamp() {
        return eventTimestamp;
    }

    public void setEventTimestamp(long eventTimestamp) {
        this.eventTimestamp = eventTimestamp;
    }

    public String getChannelData() {
        return channelData;
    }

    public void setChannelData(String channelData) {
        this.channelData = channelData;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        SourceSerializePO that = (SourceSerializePO) o;
        return eventTimestamp == that.eventTimestamp && Objects.equals(bank, that.bank) && Objects.equals(channel, that.channel) && Objects.equals(channelData, that.channelData);
    }

    @Override
    public int hashCode() {
        return Objects.hash(bank, channel, eventTimestamp, channelData);
    }

    @Override
    public String toString() {
        return "SourceSerializePO{" +
                "bank='" + bank + '\'' +
                ", channel='" + channel + '\'' +
                ", eventTimestamp=" + eventTimestamp +
                ", channelData='" + channelData + '\'' +
                '}';
    }
}
